<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        ul{
            list-style: none;
         
        }
        li{
            border: 1px solid black;
            width: 500px;
          height: 100px;
        }

    </style>
</head>
<body>
    <ul>
        <li></li>
        <li></li>
        <li></li>
    </ul>
    <script>
        let  lis=document.querySelectorAll("li");
        for (const li of lis) {
            li.addEventListener("click",function(){
                li.style.backgroundColor="blue";
            });
        }
    </script>
</body>
</html>